//
//  HotViewcontroller.m
//  YSBEmployer
//
//  Created by developer on 2021/12/05.
//  Copyright © 2021 ysb. All rights reserved.
//

#import "YSBQuickReleaseOrderViewController.h"


@implementation YSBQuickReleaseOrderViewController

#pragma mark - Action 发布模板设置数据
- (void)navigationRightAction {
    [self.view endEditing:YES];
    
    YSBIssuanceTemplateViewController *vc = [[YSBIssuanceTemplateViewController alloc]init];

    vc.clickPlayOrderAction = ^(YSBIssuanceTemplateOrderModel *model) {
        
        //模型赋值转换
        YSBRecruitModel *recruitModel = [[YSBRecruitModel alloc] init];
        
        //地址模型赋值
        YSBRecruitAddressModel *address = [[YSBRecruitAddressModel alloc] init];
        address = model.address;
        recruitModel.address = address;
        
        
        YSBRecruitMissionModel *mission = [[YSBRecruitMissionModel alloc] init];
        mission.ID                      = model.ID.integerValue;
        mission.mission_no              = model.mission_no;
        
        mission.duration                = model.duration;
        mission.i_id                    = model.i_id;
        mission.i_name                  = model.i_name;
        mission.ct_id                   = model.ct_id;
        mission.ct_name                 = model.ct_name;
        mission.jt_id                   = model.jt_id;
        mission.jt_name                 = model.jt_name;
        mission.price                   = model.price;
        mission.number                  = model.number.integerValue;
        mission.time_type               = model.time_type;
        mission.time_type_int           = model.time_type_int.integerValue;
        mission.gender                  = model.gender;
        mission.gender_int              = model.gender_int.integerValue;
        mission.age_s                   = model.age_s.integerValue;
        mission.age_e                   = model.age_e.integerValue;
        mission.contents                = model.contents;
        mission.other_contents          = model.other_contents;
        mission.work_time               = model.work_time;
        mission.rest_time_list          = model.rest_time_list;
        mission.work_time_template      = model.work_time_template;
        mission.rest_time_list_template = model.rest_time_list_template;
        
        //misson模型赋值
        recruitModel.mission  = mission;
                        
        [self resetRecruitWithRecruitModel:recruitModel];

    };
    [self.navigationController pushViewController:vc animated:YES];
}


@end
